package com.bailan.foreat.controller;

import com.bailan.foreat.entity.Nutrition;
import com.bailan.foreat.service.NutritionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ste
 * @since 2023-02-21 07:50:43
 */
@RestController
@RequestMapping("/nutrition")
public class NutritionController {

    @Autowired
    NutritionService nutritionService;

    @RequestMapping("all")
    public List<Nutrition> all(){
        List<Nutrition> list = nutritionService.list();
        return list;
    }

}

